<template>
  <div class="center-pane">
    <div> 
      <person-card :person="person"></person-card>
    </div>
    <div>
      <person-notes></person-notes>
    </div>
  </div>
</template>

<script>
import PersonCard from "./PersonCard.vue";
import PersonNotes from "./PersonNotes.vue";
export default {
  props: ["p"],
  components: {
    PersonCard,
    PersonNotes,
  },
  data() {
    return {
      pid: this.$route.params.pid,
      person: {},
    }
  },
  created() {
    this.fetchPersonInfo();
  },
  methods: {
    fetchPersonInfo() {
      this.$axios.get("/api/v1/people/get/" + this.pid).then((res) => {
        console.log(res.data);
        this.person = res.data;
      });
    },
  }
};
</script>